import java.lang.StringBuilder;


public class ReverseToken {

  public static void main(String[] args) {
    String test = "Hello  World  Alice";
    System.out.println(reverse(test, ""));
  }

  private static String reverse(String in, String out) {
    if (in.isEmpty()) {
      return out;
    } else {
      if (in.charAt(0) == ' ') {
        return out + ' ' + reverse(in.substring(1), "");
      } else {
        return reverse(in.substring(1), in.charAt(0) + out);
      }
    }
  }

}
